﻿<%@ Page Title="学生注册" Language="C#" MasterPageFile="~/Master.master" AutoEventWireup="true"
    CodeFile="Registers.aspx.cs" Inherits="Registers" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="head">
<script type="text/javascript">
    function isvalid() {
        if ($("#ContentPlaceHolder1_txtSno").val().trim() == "") {
            alert("学号不能为空");
            return false;
        }
        if ($("#ContentPlaceHolder1_txtSpwd1").val().trim() == "") {
            alert("密码不能为空");
            return false;
        }
    }
</script>
</asp:Content>
<asp:Content ID="MainContent" runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
    <fieldset>
        <legend>学生注册</legend>
        <table class="table-hover tablewidth">
            <tr>
                <td>
                    学号
                </td>
                <td>
                    <asp:TextBox ID="txtSno" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    密码
                </td>
                <td>
                    <asp:TextBox ID="txtSpwd1" runat="server" TextMode="Password" MaxLength="16"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    确认密码
                </td>
                <td>
                    <asp:TextBox ID="txtSpwd2" runat="server" TextMode="Password" MaxLength="16"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    姓名
                </td>
                <td>
                    <asp:TextBox ID="txtSname" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    性别
                </td>
                <td>
                    <asp:RadioButton ID="RdMale" runat="server" Checked="true" GroupName="Sex" Text="男" />
                    <asp:RadioButton ID="rdFemale" runat="server" GroupName="Sex" Text="女" />
                </td>
            </tr>
            <tr>
                <td>
                    专业
                </td>
                <td>
                    <asp:DropDownList ID="ddlMajor" runat="server">
                        <asp:ListItem Selected="True" Text="计算机科学与技术"></asp:ListItem>
                        <asp:ListItem Text="信息管理与信息系统"></asp:ListItem>
                        <asp:ListItem Text="网络工程"></asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>
                    班级
                </td>
                <td>
                    <asp:TextBox ID="txtSclass" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    生日
                </td>
                <td>
                    <asp:ScriptManager ID="ScriptManager" runat="server">
                    </asp:ScriptManager>
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>
                            <div>
                                <asp:TextBox ID="txtSbirth" runat="server"></asp:TextBox></div>
                            <div id="ca" style="display: none; position: absolute; margin-left: 100px">
                                <asp:Calendar ID="Calendar1" runat="server" BackColor="White" BorderColor="#3366CC"
                                    Font-Names="Verdana" Font-Size="8pt" ForeColor="#003399" Height="200px" Width="220px"
                                    CellPadding="1" DayNameFormat="Shortest" BorderWidth="1px" OnSelectionChanged="Calendar1_SelectionChanged"
                                    OnVisibleMonthChanged="Calendar1_VisibleMonthChanged">
                                    <SelectedDayStyle BackColor="#009999" ForeColor="#CCFF99" Font-Bold="True" />
                                    <SelectorStyle BackColor="#99CCCC" ForeColor="#336666" />
                                    <WeekendDayStyle BackColor="#CCCCFF" />
                                    <TodayDayStyle BackColor="#99CCCC" ForeColor="White" />
                                    <OtherMonthDayStyle ForeColor="#999999" />
                                    <NextPrevStyle Font-Size="8pt" ForeColor="#CCCCFF" />
                                    <DayHeaderStyle BackColor="#99CCCC" ForeColor="#336666" Height="1px" />
                                    <TitleStyle BackColor="#003399" Font-Bold="True" Font-Size="10pt" ForeColor="#CCCCFF"
                                        BorderColor="#3366CC" BorderWidth="1px" Height="25px" />
                                </asp:Calendar>
                            </div>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </td>
            </tr>
            <tr>
                <td>
                    去向
                </td>
                <td>
                    <asp:DropDownList ID="ddlSgo" runat="server">
                        <asp:ListItem Selected="True" Text="待业"></asp:ListItem>
                        <asp:ListItem Text="就业"></asp:ListItem>
                        <asp:ListItem Text="考研"></asp:ListItem>
                        <asp:ListItem Text="出国"></asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td colspan="2" style="text-align:center">
                    <asp:Button ID="btnReg" runat="server" Text="注册" CssClass="btn btn-success btn-large" OnClientClick="return isvalid()" OnClick="btnReg_Click" />
                </td>
            </tr>
        </table>
    </fieldset>
</asp:Content>
